package org.lzfto.flink.demo.business.flinkTest.jdbc;

import java.sql.PreparedStatement;
import java.sql.SQLException;

import org.apache.flink.connector.jdbc.JdbcStatementBuilder;
import org.lzfto.flink.demo.common.SimpleOrder;

/**
*
*@author lzfto
*@创建时间 2025年7月1日 09:52:38
*/
public class CustJdbcStatementBuilder implements JdbcStatementBuilder<SimpleOrder> {
	private static final long serialVersionUID = 1L;

	@Override
	public void accept(PreparedStatement ps, SimpleOrder order) throws SQLException {
		ps.setLong(1, order.getId());
		ps.setString(2, order.getCategoryCode());
		ps.setString(3, order.getBrand());
		ps.setBigDecimal(4, order.getPrice());
		ps.setLong(5, order.getAge());
		ps.setString(6, order.getSex());
		ps.setString(7, order.getZoneName());
	}

}
